<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Validate</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> Validate</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validation class</p>
<p class="description"><p>Package to validate various datas. It includes : <ul><li>numbers (min/max, decimal or not)</li><li>email (syntax, domain check)</li><li>string (predifined type alpha upper and/or lowercase, numeric,...)</li><li>date (min, max)</li><li>uri (RFC2396)</li><li>possibility valid multiple data with a single method call (::multiple)</li></ul></p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Amir Mohammad Saied &lt;<a href="mailto:amir@php.net">amir@php.net</a>&gt;</li>
				<li><span class="field">author:</span> Tomas V.V.Cox &lt;<a href="mailto:cox@idecnet.com">cox@idecnet.com</a>&gt;</li>
				<li><span class="field">author:</span> Pierre-Alain Joye &lt;<a href="mailto:pajoye@php.net">pajoye@php.net</a>&gt;</li>
				<li><span class="field">version:</span> Release: @package_version@</li>
				<li><span class="field">copyright:</span> 1997-2006 Pierre-Alain Joye,Tomas V.V.Cox,Amir Mohammad Saied</li>
				<li><span class="field">link:</span> <a href="http://pear.php.net/package/Validate">http://pear.php.net/package/Validate</a></li>
				<li><span class="field">license:</span> <a href="http://www.opensource.org/licenses/bsd-license.php">New BSD License</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_lib---Validate.php.html">/lib/Validate.php</a> (line <span class="field">82</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$_cctld" title="details" class="var-name">$_cctld</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$_gtld" title="details" class="var-name">$_gtld</a>
				</div>
																<div class="var-title">
					<img src="../media/images/Variable.png" alt=" " />
					<span class="var-type">array</span>
					<a href="#$_itld" title="details" class="var-name">$_itld</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">boolean</span>
										<a href="#date" title="details" class="method-name">date</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$date</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$options</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">boolean</span>
										<a href="#email" title="details" class="method-name">email</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">true</span>
										<a href="#executeFullEmailValidation" title="details" class="method-name">executeFullEmailValidation</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$arrayOfTLDs</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#multiple" title="details" class="method-name">multiple</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$data</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$val_type</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$remove</span> = <span class="var-default">false</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$data</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$val_type</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">boolean</span>
										<a href="#number" title="details" class="method-name">number</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$number</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">array()</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">boolean</span>
										<a href="#string" title="details" class="method-name">string</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$options</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">boolean</span>
										<a href="#uri" title="details" class="method-name">uri</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#_checkControlNumber" title="details" class="method-name">_checkControlNumber</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$number</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$weights</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$modulo</span> = <span class="var-default">10</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$subtract</span> = <span class="var-default">0</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$weights</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#_fullTLDValidation" title="details" class="method-name">_fullTLDValidation</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$options</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">int</span>
										<a href="#_getControlNumber" title="details" class="method-name">_getControlNumber</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$number</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$weights</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$modulo</span> = <span class="var-default">10</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$subtract</span> = <span class="var-default">0</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$allow_high</span> = <span class="var-default">false</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$weights</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#_modf" title="details" class="method-name">_modf</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$val</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$div</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">int</span>
										<a href="#_multWeights" title="details" class="method-name">_multWeights</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$number</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$weights</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$weights</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$_cctld" id="$_cctld"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_cctld</span>
			 = <span class="var-default">array(<br />        'ac',<br />        'ad','ae','af','ag',<br />        'ai','al','am','an',<br />        'ao','aq','ar','as',<br />        'at','au','aw','ax',<br />        'az','ba','bb','bd',<br />        'be','bf','bg','bh',<br />        'bi','bj','bm','bn',<br />        'bo','br','bs','bt',<br />        'bu','bv','bw','by',<br />        'bz','ca','cc','cd',<br />        'cf','cg','ch','ci',<br />        'ck','cl','cm','cn',<br />        'co','cr','cs','cu',<br />        'cv','cx','cy','cz',<br />        'de','dj','dk','dm',<br />        'do','dz','ec','ee',<br />        'eg','eh','er','es',<br />        'et','eu','fi','fj',<br />        'fk','fm','fo','fr',<br />        'ga','gb','gd','ge',<br />        'gf','gg','gh','gi',<br />        'gl','gm','gn','gp',<br />        'gq','gr','gs','gt',<br />        'gu','gw','gy','hk',<br />        'hm','hn','hr','ht',<br />        'hu','id','ie','il',<br />        'im','in','io','iq',<br />        'ir','is','it','je',<br />        'jm','jo','jp','ke',<br />        'kg','kh','ki','km',<br />        'kn','kp','kr','kw',<br />        'ky','kz','la','lb',<br />        'lc','li','lk','lr',<br />        'ls','lt','lu','lv',<br />        'ly','ma','mc','md',<br />        'me','mg','mh','mk',<br />        'ml','mm','mn','mo',<br />        'mp','mq','mr','ms',<br />        'mt','mu','mv','mw',<br />        'mx','my','mz','na',<br />        'nc','ne','nf','ng',<br />        'ni','nl','no','np',<br />        'nr','nu','nz','om',<br />        'pa','pe','pf','pg',<br />        'ph','pk','pl','pm',<br />        'pn','pr','ps','pt',<br />        'pw','py','qa','re',<br />        'ro','rs','ru','rw',<br />        'sa','sb','sc','sd',<br />        'se','sg','sh','si',<br />        'sj','sk','sl','sm',<br />        'sn','so','sr','st',<br />        'su','sv','sy','sz',<br />        'tc','td','tf','tg',<br />        'th','tj','tk','tl',<br />        'tm','tn','to','tp',<br />        'tr','tt','tv','tw',<br />        'tz','ua','ug','uk',<br />        'us','uy','uz','va',<br />        'vc','ve','vg','vi',<br />        'vn','vu','wf','ws',<br />        'ye','yt','yu','za',<br />        'zm','zw',<br />    )</span>			(line <span class="line-number">142</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Country code top-level domains</p>
<p class="description"><p>This is an array of the official country  codes top-level domains</p></p>
	<ul class="tags">
				<li><span class="field">var:</span> (Country Code Top-Level Domain)</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_gtld" id="$_gtld"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_gtld</span>
			 = <span class="var-default">array(<br />        'aero',<br />        'biz',<br />        'cat',<br />        'com',<br />        'coop',<br />        'edu',<br />        'gov',<br />        'info',<br />        'int',<br />        'jobs',<br />        'mil',<br />        'mobi',<br />        'museum',<br />        'name',<br />        'net',<br />        'org',<br />        'pro',<br />        'travel',<br />        'asia',<br />        'post',<br />        'tel',<br />        'geo',<br />    )</span>			(line <span class="line-number">108</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Generic top-level domain</p>
<p class="description"><p>This is an array of the official  generic top-level domains.</p></p>
	<ul class="tags">
				<li><span class="field">var:</span> (Generic top-level domains)</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_itld" id="$_itld"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<img src="../media/images/Variable.png" />
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_itld</span>
			 = <span class="var-default">array(<br />        'arpa',<br />        'root',<br />    )</span>			(line <span class="line-number">94</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">International Top-Level Domain</p>
<p class="description"><p>This is an array of the known international  top-level domain names.</p></p>
	<ul class="tags">
				<li><span class="field">var:</span> (International top-level domains)</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methoddate" id="date"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">date</span> (line <span class="line-number">745</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validate date and times. Note that this method need the Date_Calc class</p>
	<ul class="tags">
				<li><span class="field">return:</span> true if valid date/time, false if not</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			date
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$date</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$options</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$date</span><span class="var-description">: Date to validate</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$options</span><span class="var-description">: array options where :                           'format' The format of the date (%d-%m-%Y)                                    or rfc822_compliant                           'min'    The date has to be greater                                    than this array($day, $month, $year)                                    or PEAR::Date object                           'max'    The date has to be smaller than                                    this array($day, $month, $year)                                    or PEAR::Date object</span>			</li>
				</ul>
		
			
	</div>
<a name="methodemail" id="email"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">email</span> (line <span class="line-number">515</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validate an email</p>
	<ul class="tags">
				<li><span class="field">return:</span> true if valid email, false if not</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			email
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$email</span><span class="var-description">: email to validate</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$options</span><span class="var-description">: <p>boolean (BC) $check_domain Check or not if the domain exists               array $options associative array of options               'check_domain' boolean Check or not if the domain exists               'use_rfc822' boolean Apply the full RFC822 grammar</p><p>Ex.   $options = array(       'check_domain' =&gt; 'true',       'fullTLDValidation' =&gt; 'true',       'use_rfc822' =&gt; 'true',       'VALIDATE_GTLD_EMAILS' =&gt; 'true',       'VALIDATE_CCTLD_EMAILS' =&gt; 'true',       'VALIDATE_ITLD_EMAILS' =&gt; 'true',       );</p></span>			</li>
				</ul>
		
			
	</div>
<a name="methodexecuteFullEmailValidation" id="executeFullEmailValidation"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">executeFullEmailValidation</span> (line <span class="line-number">480</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Execute the validation</p>
<p class="description"><p>This function will execute the full email vs tld  validation using an array of tlds passed to it.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> or false (Depending on if it validates or if it does not)</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">true</span>
		<span class="method-name">
			executeFullEmailValidation
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$arrayOfTLDs</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$email</span><span class="var-description">: The email to validate.</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$arrayOfTLDs</span><span class="var-description">: The array of the TLDs to validate</span>			</li>
				</ul>
		
			
	</div>
<a name="methodmultiple" id="multiple"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">multiple</span> (line <span class="line-number">1059</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Bulk data validation for data introduced in the form of an  assoc array in the form $var_name =&gt; $value.</p>
<p class="description"><p>Can be used on any of Validate subpackages</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> value name =&gt; true|false    the value name comes from the data key</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			multiple
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$data</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$val_type</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$remove</span> = <span class="var-default">false</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$data</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$val_type</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$data</span><span class="var-description">: Ex: array('name' =&gt; 'toto', 'email' =&gt; 'toto@thing.info');</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$val_type</span><span class="var-description">: Contains the validation type and all parameters used in.                           'val_type' is not optional                           others validations properties must have the same name as the function                           parameters.                           Ex: array('toto'=&gt;array('type'=&gt;'string','format'='toto@thing.info','min_length'=&gt;5));</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$remove</span><span class="var-description">: if set, the elements not listed in data will be removed</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$data</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$val_type</span>			</li>
				</ul>
		
			
	</div>
<a name="methodnumber" id="number"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">number</span> (line <span class="line-number">260</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validate a number</p>
	<ul class="tags">
				<li><span class="field">return:</span> true if valid number, false if not</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			number
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$number</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$number</span><span class="var-description">: Number to validate</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$options</span><span class="var-description">: array where:                           'decimal'  is the decimal char or false when decimal                                      not allowed.                                      i.e. ',.' to allow both ',' and '.'                           'dec_prec' Number of allowed decimals                           'min'      minimum value                           'max'      maximum value</span>			</li>
				</ul>
		
			
	</div>
<a name="methodstring" id="string"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">string</span> (line <span class="line-number">607</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validate a string using the given format 'format'</p>
	<ul class="tags">
				<li><span class="field">return:</span> true if valid string, false if not</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			string
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$string</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$options</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$string</span><span class="var-description">: String to validate</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$options</span><span class="var-description">: Options array where:                           'format' is the format of the string                               Ex:VALIDATE_NUM . VALIDATE_ALPHA (see constants)                           'min_length' minimum length                           'max_length' maximum length</span>			</li>
				</ul>
		
			
	</div>
<a name="methoduri" id="uri"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">uri</span> (line <span class="line-number">669</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validate an URI (RFC2396)</p>
<p class="description"><p>This function will validate 'foobarstring' by default, to get it to validate  only http, https, ftp and such you have to pass it in the allowed_schemes  option, like this:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-var">$options&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'allowed_schemes'&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'http'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'https'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'ftp'</span><span class="src-sym">))</span></div></li>
<li><div class="src-line">&nbsp;<a href="http://www.php.net/var_dump">var_dump</a><span class="src-sym">(</span><span class="src-id"><a href="../Validate/Validate.html">Validate</a></span><span class="src-sym">::</span><a href="../Validate/Validate.html#methoduri">uri</a><span class="src-sym">(</span><span class="src-str">'http://www.example.org'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$options</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
</ol></div></p><p>NOTE 1: The rfc2396 normally allows middle '-' in the top domain          e.g. http://example.co-m should be valid          However, as '-' is not used in any known TLD, it is invalid  NOTE 2: As double shlashes // are allowed in the path part, only full URIs          including an authority can be valid, no relative URIs          the // are mandatory (optionally preceeded by the 'sheme:' )  NOTE 3: the full complience to rfc2396 is not achieved by default          the characters ';/?:@$,' will not be accepted in the query part          if not urlencoded, refer to the option &quot;strict'&quot;</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> true if valid uri, false if not</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			uri
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$url</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$url</span><span class="var-description">: URI to validate</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$options</span><span class="var-description">: Options used by the validation method.                           key =&gt; type                           'domain_check' =&gt; boolean                               Whether to check the DNS entry or not                           'allowed_schemes' =&gt; array, list of protocols                               List of allowed schemes ('http',                               'ssh+svn', 'mms')                           'strict' =&gt; string the refused chars                               in query and fragment parts                               default: ';/?:@$,'                               empty: accept all rfc2396 foreseen chars</span>			</li>
				</ul>
		
			
	</div>
<a name="method_checkControlNumber" id="_checkControlNumber"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">_checkControlNumber</span> (line <span class="line-number">1022</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validates a number</p>
	<ul class="tags">
				<li><span class="field">return:</span> true if valid, false if not</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			_checkControlNumber
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$number</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$weights</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$modulo</span> = <span class="var-default">10</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$subtract</span> = <span class="var-default">0</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$weights</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$number</span><span class="var-description">: number to validate</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$weights</span><span class="var-description">: reference to array of weights</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$modulo</span><span class="var-description">: (optional) number</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$subtract</span><span class="var-description">: (optional) number</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$weights</span>			</li>
				</ul>
		
			
	</div>
<a name="method_fullTLDValidation" id="_fullTLDValidation"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">_fullTLDValidation</span> (line <span class="line-number">445</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Full TLD Validation function</p>
<p class="description"><p>This function is used to make a much more proficient validation  against all types of official domain names.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> True if validating succeeds</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			_fullTLDValidation
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$email</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$options</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$email</span><span class="var-description">: The email address to check.</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$options</span><span class="var-description">: The options for validation</span>			</li>
				</ul>
		
			
	</div>
<a name="method_getControlNumber" id="_getControlNumber"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">_getControlNumber</span> (line <span class="line-number">992</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calculates control digit for a given number</p>
	<ul class="tags">
				<li><span class="field">return:</span> -1 calculated control number is returned</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			_getControlNumber
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$number</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$weights</span>, [<span class="var-type">int</span>&nbsp;<span class="var-name">$modulo</span> = <span class="var-default">10</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$subtract</span> = <span class="var-default">0</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$allow_high</span> = <span class="var-default">false</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$weights</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$number</span><span class="var-description">: number string</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$weights</span><span class="var-description">: reference to array of weights</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$modulo</span><span class="var-description">: (optionsl) number</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$subtract</span><span class="var-description">: (optional) number</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$allow_high</span><span class="var-description">: (optional) true if function can return number higher than 10</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$weights</span>			</li>
				</ul>
		
			
	</div>
<a name="method_modf" id="_modf"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">_modf</span> (line <span class="line-number">939</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_modf
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$val</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$div</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$val</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$div</span>			</li>
				</ul>
		
			
	</div>
<a name="method_multWeights" id="_multWeights"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">_multWeights</span> (line <span class="line-number">961</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calculates sum of product of number digits with weights</p>
	<ul class="tags">
				<li><span class="field">return:</span> returns product of number digits with weights</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			_multWeights
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$number</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$weights</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$weights</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$number</span><span class="var-description">: number string</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$weights</span><span class="var-description">: reference to array of weights</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$weights</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Fri, 15 Oct 2010 18:20:34 +1100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>